-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Filebeat module for monitoring Santa #9540
Add Filebeat module for monitoring Santa #9540
Conversation
f2f1caf
to
e3cd5e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎅 Overall LGTM. I wonder if that is a module we should keep in the long term? ;-)
description: > | ||
Santa Module | ||
fields: | ||
- name: santa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume all fields are on the module level on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm never expecting there to be anything other than the "log" dataset so dropped the .log
. Hopefully that's ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Suggesting a minor improvement to make conversion to int easier, and also convert user/group.id to int.
"grok": { | ||
"field": "message", | ||
"patterns": [ | ||
"\\[%{TIMESTAMP_ISO8601:process.start}\\] I santad: action=%{NOT_SEPARATOR:santa.action}\\|decision=%{NOT_SEPARATOR:santa.decision}\\|reason=%{NOT_SEPARATOR:santa.reason}\\|sha256=%{NOT_SEPARATOR:hash.sha256}\\|path=%{NOT_SEPARATOR:process.executable}(\\|args=%{NOT_SEPARATOR:process.args})?(\\|cert_sha256=%{NOT_SEPARATOR:certificate.sha256})?(\\|cert_cn=%{NOT_SEPARATOR:certificate.common_name})?\\|pid=%{NUMBER:process.pid}\\|ppid=%{NUMBER:process.ppid}\\|uid=%{NUMBER:user.id}\\|user=%{NOT_SEPARATOR:user.name}\\|gid=%{NUMBER:group.id}\\|group=%{NOT_SEPARATOR:group.name}\\|mode=%{WORD:santa.mode}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"\\[%{TIMESTAMP_ISO8601:process.start}\\] I santad: action=%{NOT_SEPARATOR:santa.action}\\|decision=%{NOT_SEPARATOR:santa.decision}\\|reason=%{NOT_SEPARATOR:santa.reason}\\|sha256=%{NOT_SEPARATOR:hash.sha256}\\|path=%{NOT_SEPARATOR:process.executable}(\\|args=%{NOT_SEPARATOR:process.args})?(\\|cert_sha256=%{NOT_SEPARATOR:certificate.sha256})?(\\|cert_cn=%{NOT_SEPARATOR:certificate.common_name})?\\|pid=%{NUMBER:process.pid}\\|ppid=%{NUMBER:process.ppid}\\|uid=%{NUMBER:user.id}\\|user=%{NOT_SEPARATOR:user.name}\\|gid=%{NUMBER:group.id}\\|group=%{NOT_SEPARATOR:group.name}\\|mode=%{WORD:santa.mode}" | |
"\\[%{TIMESTAMP_ISO8601:process.start}\\] I santad: action=%{NOT_SEPARATOR:santa.action}\\|decision=%{NOT_SEPARATOR:santa.decision}\\|reason=%{NOT_SEPARATOR:santa.reason}\\|sha256=%{NOT_SEPARATOR:hash.sha256}\\|path=%{NOT_SEPARATOR:process.executable}(\\|args=%{NOT_SEPARATOR:process.args})?(\\|cert_sha256=%{NOT_SEPARATOR:certificate.sha256})?(\\|cert_cn=%{NOT_SEPARATOR:certificate.common_name})?\\|pid=%{NUMBER:process.pid:int}\\|ppid=%{NUMBER:process.ppid:int}\\|uid=%{NUMBER:user.id:int}\\|user=%{NOT_SEPARATOR:user.name}\\|gid=%{NUMBER:group.id:int}\\|group=%{NOT_SEPARATOR:group.name}\\|mode=%{WORD:santa.mode}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion to simplify the pipeline, and remove the need for a few convert
blocks below.
Notice that I'm also converting the user.id
and group.id
in this suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated as suggested, but I did not change user.id
or group.id
because they are keyword in ECS (I assume this is in order to accommodate SID values from Windows).
description: SHA256 hash of code signing certificate. | ||
|
||
# Auditbeat FIM is using this field for the same purpose. | ||
- name: hash.sha256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it common elsewhere to use certificate
and keyword
at the top level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The closest thing we have is tls.{client,server}_certificate.fingerprint.sha256
.
@ruflin The project has been alive for about 4 years. I doubt it's a holiday prank LOL. |
This adds a Filebeat module for monitoring and parsing the log file generated by the Google Santa, a process monitoring tools for MacOS. This module includes an overview dashboard. https://github.com/google/santa
f773e33
to
0a6362a
Compare
Oh when I read the title I thought this was going to be an easter egg! 😄 🎅 |
Pinging @elastic/secops |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's backport to 6.x?
It can be backported. I'll add the label as a reminder. I'm pretty sure the backport will need some fields added to fields.yml since this currently depends on some ECS fields. |
@andrewkroh should this be included in our announcement of features in the 7.0 release? I don't think we've mentioned it anywhere yet. Should it be listed as ECS-compatible? Thanks. |
@MikePaquette Absolutely. And it is ECS-compatible. |
This adds a Filebeat module for monitoring and parsing the log file generated
by the Google Santa, a process monitoring tool for MacOS. This module includes
an overview dashboard.
https://github.com/google/santa